#==============================================================================
# fog
# depends on boost, libevent, openssl
#==============================================================================
CMAKE_MINIMUM_REQUIRED(VERSION 2.6)
SET(CMAKE_ALLOW_LOOSE_LOOP_CONSTRUCTS ON)

PROJECT(fog)

#------------------------------------------------------------------------------
IF (WIN32)
ADD_DEFINITIONS(-D__WINDOWS__)
ELSE()
ADD_DEFINITIONS(-D__LINUX__)
ENDIF()

#------------------------------------------------------------------------------
INCLUDE_DIRECTORIES(
    ${PROJECT_SOURCE_DIR}
    ${PROJECT_SOURCE_DIR}/../
)

set(fog_SRC
    Typedef.hpp

    thread/LockGuard.hpp
    thread/Mutex.hpp
    thread/Mutex.cc
    thread/Thread.hpp
    thread/Thread.cc
    
    util/CircleBuffer.hpp
    util/CircleBuffer.cc
    util/MessageBlock.hpp
    util/MessageBlock.cc
    util/ByteBuffer.hpp
    util/ByteBuffer.cc
    
    crypto/BigNumber.hpp
    crypto/BigNumber.cc
    crypto/Sha1.hpp
    crypto/Sha1.cc
    
    net/Socket.hpp
    net/Socket.cc
    net/SocketFactory.hpp
    net/SocketManager.hpp
    net/SocketManager.cc
    net/SocketThread.hpp
    net/SocketThread.cc
)

#------------------------------------------------------------------------------
ADD_LIBRARY(fog STATIC ${fog_SRC})